﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FishTank
{
    class OperatingSensor
    {
        //Set deafult to not broken
        bool broken = false;

        public bool isBroken()
        {
            return broken;
        }

        public void setBrokenState(bool state)
        {
            broken = state;
        }

        public bool isWaterTooLow(double waterLevel, double operatingSensorHeight)
        {
            //Checks it the water level is too low
            if (waterLevel < operatingSensorHeight || broken == true)
            {
                return true;
            }
            return false;
        }

        public bool isWaterTooDamnHigh(double waterLevel, double safetySensorHeight)
        {
            //Make sure that the water level is not too damn high
            if (waterLevel > safetySensorHeight)
            {
                return true;
            }
            return false;
        }
    }
}
